<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<script type="text/javascript">
    function setRadioSelectedValue(val,targetId,text){
	    document.getElementById(targetId+"_name").value = text;
	    document.getElementById(targetId).value = val;
    }
</script>
<table class="t_css" width="100%" border="0" cellpadding="0"
	id="orgInfo" cellspacing="1">
	<tr>
		<td colspan="6" class="t_bar">&nbsp;单位基本信息</td>
	</tr>
	<tr>
		<td width="100px" align="right">单位名称：</td>
		<input type="hidden" name="organizations/organization[0]@submit_org" value="1">
			<td>&nbsp; 
			    <input type="hidden" name="organizations/organization[0]/sequence_no" value="1">
				<input type="hidden" name="organizations/organization[0]/org_code"
					                 value="<x:out select="$xmlData/data/organizations/organization[@submit_org=1]/org_code"/>">
				<span name="organizations/organization[0]/cname"> <x:out
						select="$xmlData/data/organizations/organization[@submit_org=1]/org_name" />
				</span></td>
			<td width="100px" align="right">组织机构代码：</td>
			<td>&nbsp;<span name="organizations/organization[0]/org_no">
					<x:out
						select="$xmlData/data/organizations/organization[@submit_org=1]/org_no" />
			</span>
		</td>
	</tr>
	<tr>
		<td align="right">通讯地址：</td>
		<td colspan="5">&nbsp;
		     <span name="organizations/organization[0]/address">
				<x:out select="$xmlData/data/organizations/organization[@submit_org=1]/address" />
		     </span>
		</td>
	</tr>
	<tr>
	    <td align="right">邮政编码：</td>
		<td>&nbsp;
		     <span name="organizations/organization[0]/zip_code">
				<x:out select="$xmlData/data/organizations/organization[@submit_org=1]/zip_code" />
		     </span>
		</td>
	    <td align="right">法人代表：</td>
		<td>&nbsp;
		     <span name="organizations/organization[0]/legal_name">
				<x:out select="$xmlData/data/organization_persons/legal_name" />
		     </span>
		</td>
	</tr>
	<tr>
	    <td align="right">联系人：</td>
		<td>&nbsp;
		      <span name="proposal/contact_name">
		         <x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_name" />
		     </span>
		</td>
		<td align="right">联系电话：</td>
		<td>&nbsp; 
		     <span name="proposal/contact_tel"><x:out
					select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_tel" />
		     </span>
		</td>
	</tr>
	<tr>
	    <td align="right">电子邮箱：</td>
		<td>&nbsp;
		    <span name="proposal/contact_email"><x:out
				select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_email" />
		    </span>
		</td>
		<td align="right">传真号码：</td>
		<td>&nbsp;
		   <span name="organizations/organization[0]/fax"><x:out
				select="$xmlData/data/organizations/organization[@submit_org=1]/fax" />
		    </span>
		</td>
	</tr>
	<tr>
		<td align="right">单位性质：</td>
		<td colspan="5">&nbsp;
		    <span name="organizations/organization[0]/nature_type_name"> <x:out
					select="$xmlData/data/organizations/organization[@submit_org=1]/nature_name" />
		    </span> 
		    <span style="display: none"
			     name="organizations/organization[0]/nature_type"> <x:out
				    select="$xmlData/data/organizations/organization[@submit_org=1]/nature_value" />
		    </span>
		</td>
	</tr>
	<tr>
	    <td align="right">企业规模：</td>
		<td>&nbsp;
		    <input type="radio" name="qiyescale" id="qiyescale" value="1" class="radioButton" onClick="setRadioSelectedValue(this.value,'qiyescale_value','大型')"/>大型
			<input type="radio" name="qiyescale" id="qiyescale" value="2" class="radioButton" onClick="setRadioSelectedValue(this.value,'qiyescale_value','中型')"/>中型
			<input type="radio" name="qiyescale" id="qiyescale" value="3" class="radioButton" onClick="setRadioSelectedValue(this.value,'qiyescale_value','小型')"/>小型
			<input type="hidden" name="qiyescale_value_name" id="qiyescale_value_name" value=""/>
			<input type="hidden" name="qiyescale_value" id="qiyescale_value" value="" class="required" label="企业规模"/>
		</td>
		<td align="right">高新技术企业：</td>
		<td>&nbsp;
		   <input type="radio" name="gaoxin" id="gaoxin" value="1" class="radioButton" onClick="setRadioSelectedValue(this.value,'gaoxin_value','是')"/>是
			<input type="radio" name="gaoxin" id="gaoxin" value="2" class="radioButton" onClick="setRadioSelectedValue(this.value,'gaoxin_value','否')"/>否
			<input type="hidden" name="gaoxin_value_name" id="gaoxin_value_name" value=""/>
			<input type="hidden" name="gaoxin_value" id="gaoxin_value" value="" class="required" label="高新技术企业"/>
		</td>
	</tr>
</table>
<br/>
<div class="t_bar">
	<span class="color_red">*</span>主要股东（按股权比例列出前三名）
</div>
<table class="t_css table01" width="100%" border="0" cellpadding="0"
	id="tblShareholders" cellspacing="1">
    <thead>
		<tr>
			<th class="TblHead" align="center" width="30px">选择</th>
			<th class="TblHead" align="center" width="30px">序号</th>
			<th class="TblHead" align="center" width="250px">股东名称 </th>
			<th class="TblHead" align="center" width="160px">所占股份比（%）</th>
			<th class="TblHead" align="center" width="230px">出资形式</th> 
		</tr>
			</thead>
			<tbody id="tab">
					<tr style="display:none">
						<td>&nbsp;
							<input type="radio" class="radiobutton" name="selMileStones" >
						</td>
						<td>&nbsp;
							<span name="shareholders/shareholder[0]@seq_no" >[index]</span> 
						</td>
						<td>&nbsp;
							<input type="text" size="50" name="shareholders|shareholder[0]|name" class="input_text required" maxlength=50 label="股东名称" value="" />
						</td>
						<td>&nbsp;
						    <input type="text" style="text-align:right;" name="shareholders|shareholder[0]|invest_percent" class="input_text required" maxlength=50 label="所占股份比（%）" onfocus="InitInput.setNumber(this,2,2,2)" value="" />
						</td> 
						<td>&nbsp;
						    <input type="text" size="50" name="shareholders|shareholder[0]|invest_type" class="input_text required" maxlength=50 label="出资形式" value="" />
						</td> 
					</tr>
					<c:set value="0" var="index" scope="page"/>
					<x:forEach select="$xmlData/data/shareholders/shareholder" var="shareholder">
					<c:choose>
						<c:when test="${index<10}" >
						<c:set value="0" var="flag" scope="page"/>
						</c:when>
						<c:otherwise>
						<c:set value="" var="flag" scope="page"/>
						</c:otherwise>
					</c:choose>
					<tr>
						<td>&nbsp;
							<input type="radio" class="radiobutton" name="selShareholders" >
						</td>
						<td>
							<span name="shareholders/shareholder[${flag}${index}]@seq_no" ><x:out select="$shareholder/@seq_no"/></span> 
						</td>
						<td>&nbsp;
							<input type="text" size="50" name="shareholders/shareholder[${flag}${index}]name" 
							class="input_text required" maxlength=50 label="股东名称" 
							value="<x:out select="$shareholder/name" />" />
						</td>
						<td>&nbsp;
							<input type="text" style="text-align:right;" name="shareholders/shareholder[${flag}${index}]invest_percent" 
							class="input_text required" maxlength=50 label="所占股份比（%）" onfocus="InitInput.setNumber(this,7,4,2)"
							value="<x:out select="$shareholder/invest_percent" />" />
						</td> 
						<td>&nbsp;
							<input type="text" size="50" name="shareholders/shareholder[${flag}${index}]invest_type"
							 class="input_text required" maxlength=50 label="出资形式" 
							 value="<x:out select="$shareholder/invest_type" />" />
						</td>
					</tr>
					<c:set value="${index+1}" var="index" scope="page"/>
					</x:forEach>
					<script type="text/javascript">
						showAllDateTag("tblShareholders");
					</script>
				</tbody>
			</table>
			<br>
			<table width="98%" align="center">
				<tr>
					<td>
					<!--
					<input class="button" name="cmdAddbefore" type=button value="添加" onclick="addNewRow('tblShareholders');showDateTag('tblShareholders');try{top.resizeFrame();}catch(e){};">
					-->
					<input class="button" name="cmdAddbefore" type=button value="添加" onclick="if(checkTabLimit('tblShareholders',3,'只能填写3名主要股东')){addNewRow('tblShareholders');}showDateTag('tblShareholders');try{top.resizeFrame();}catch(e){};">
					<input class="button" name="cmdMovePrev" type=button value="上移" onclick="movePrev('tblShareholders','selShareholders')">
					<input class="button" name="cmdMoveNext" type=button value="下移" onclick="moveNext('tblShareholders','selShareholders')">
					<input class="button" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow('tblShareholders','进度')">
					</td>
				</tr>
	        </table>
	        
	        

<script type="text/javascript">
	$(function() {
			$("#orgInfo tr:even").addClass("li_1");
			$("#orgInfo tr:odd").addClass("li_2");
			$("#orgInfo2 tr:even").addClass("li_1");
			$("#orgInfo2 tr:odd").addClass("li_2");
			$("#orgInfo3 tr:even").addClass("li_1");
			$("#orgInfo3 tr:odd").addClass("li_2");
			$("#contactInfo tr:even").addClass("li_1");
			$("#contactInfo tr:odd").addClass("li_2");
			$("#rateInfo tr:even").addClass("li_1");
			$("#rateInfo tr:odd").addClass("li_2");
		});
</script>